﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorldConqueror.Contracts.Maths.DataContracts;

namespace WorldConqueror.Libraries.Maths.MathShapes
{
    public interface IMathSphericalPolyline : IMathShape
    {
        IList<IMathCoordinate> MathCoordinates { get; set; }
    }

    public class MathSphericalPolyline : SphericalPolyline, IMathSphericalPolyline
    {

        public MathSphericalPolyline(ISphericalPolyline sphericalPolyline)
        {
            Coordinates = sphericalPolyline.Coordinates;
        }

        private IList<IMathCoordinate> _coordinates;
        public override IList<ICoordinate> Coordinates {
            get
            {
                return _coordinates.Cast<ICoordinate>().ToList<ICoordinate>();
            }
            set
            {
                _coordinates = value.Cast<IMathCoordinate>().ToList<IMathCoordinate>();
            }
        }
        public IList<IMathCoordinate> MathCoordinates
        {
            get
            {
                return _coordinates;
            }
            set
            {
                _coordinates = value;
            }
        }
    }
}
